package com.jiahe.blog.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jiahe.blog.entity.CategoryEntity;
import com.jiahe.blog.model.dto.CategoryDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CategoryDao extends BaseMapper<CategoryEntity> {

    /**
     * 查询分类和对应文章数量
     * @return 分类集合
     */
    List<CategoryDTO> listUserCategoryDTO(@Param("userId") Integer userId);
}
